package com.noreply.springannotation.AutowiredAndResource;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author noreply
 * @description
 * @datetime 2021/8/22 21:44
 */
public class UserService {
    private User user3;

    private User user4;

    public UserService(User user4) {
        this.user4 = user4;
    }

    @Autowired
    public User user1;

    @Autowired
    public User user2;

    public void print() {
        System.out.println(user1.toString());
        System.out.println(user2.toString());
        System.out.println(user3.toString());
        System.out.println(user4.toString());
    }


    public User getUser3() {
        return user3;
    }

    @Autowired
    public void setUser3(User user3) {
        this.user3 = user3;
    }
}
